package com.scs.application.modules.wm.controller;

import com.scs.application.core.mvc.controller.CrudController;
import com.scs.application.modules.sys.model.RestResult;
import com.scs.application.modules.wm.dto.TraceBackDTO;
import com.scs.application.modules.wm.entity.WorkOrder;
import com.scs.application.modules.wm.service.WorkOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 */
@RestController
@RequestMapping("/wm/work_order")
public class WorkOrderController extends CrudController<WorkOrderService, WorkOrder> {

    @GetMapping("/get_list_by_sn")
    public RestResult getListBySN(@RequestParam("sn") String sn) {
        TraceBackDTO map=service.getListBySN(sn);
        return  RestResult.ok("success",map);
    }

}
